﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example13_CSharp
{
    class CPolygon{
        protected int width, height;
        public CPolygon(int a){
            width=a;
        }
    public void setValues (int a, int b){
        width=a;
        height=b;
    }
    class CRectangle : CPolygon
    {
        public CRectangle(int w, int h)
            : base(w)
        {
            height = h;
        }
        public int area()
        {
            return (width * height);
        }

    }
        static void Main(string[] args)
        {
            CRectangle rect= new CRectangle (8,9);
            Console.WriteLine ("rect a:{0}",rect.area());
            
            
        }
    }
}
